﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace TaskManagementSystem.Entity
{
    [Table("system_cron_config_data")]
    public class SystemCronConfigData
    {
        private int _jobid;
        /// <summary>
        /// 任务ID
        /// </summary>		
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int JobId
        {
            get { return _jobid; }
            set { _jobid = value; }
        }

        private string _groupid = "0";
        /// <summary>
        /// 任务分组Id
        /// </summary>		
        public string GroupId
        {
            get { return _groupid; }
            set { _groupid = value; }
        }

        private string _jobkey = "";
        /// <summary>
        /// 任务键值
        /// </summary>		
        public string JobKey
        {
            get { return _jobkey; }
            set { _jobkey = value; }
        }

        private string _jobname = "";
        /// <summary>
        /// 任务名称
        /// </summary>		
        public string JobName
        {
            get { return _jobname; }
            set { _jobname = value; }
        }

        private string _assembly = "";
        /// <summary>
        /// 程序集
        /// </summary>		
        public string Assembly
        {
            get { return _assembly; }
            set { _assembly = value; }
        }

        private int _jobtype;
        /// <summary>
        /// 任务类型
        /// </summary>		
        public int JobType
        {
            get { return _jobtype; }
            set { _jobtype = value; }
        }

        private int _timespan;
        /// <summary>
        /// 任务间隔的时间
        /// </summary>		
        public int TimeSpan
        {
            get { return _timespan; }
            set { _timespan = value; }
        }

        private string _cronexpression = "";
        /// <summary>
        /// CronTrigger表达式
        /// </summary>		
        public string CronExpression
        {
            get { return _cronexpression; }
            set { _cronexpression = value; }
        }

        private bool _isrunning;
        /// <summary>
        /// 是否正在运行
        /// </summary>		
        public bool IsRunning
        {
            get { return _isrunning; }
            set { _isrunning = value; }
        }

        private DateTime _runtime = DateTime.Now;
        /// <summary>
        /// 执行时间
        /// </summary>		
        public DateTime RunTime
        {
            get { return _runtime; }
            set { _runtime = value; }
        }

        private DateTime _nexttime = DateTime.Now;
        /// <summary>
        /// 下一次执行时间
        /// </summary>		
        public DateTime NextTime
        {
            get { return _nexttime; }
            set { _nexttime = value; }
        }

        private DateTime _endtime = DateTime.Now;
        /// <summary>
        /// 结束时间
        /// </summary>		
        public DateTime EndTime
        {
            get { return _endtime; }
            set { _endtime = value; }
        }

        private int _timeconsuming;
        /// <summary>
        /// 运行耗时
        /// </summary>		
        public int TimeConsuming
        {
            get { return _timeconsuming; }
            set { _timeconsuming = value; }
        }

        private bool _isvalidity;
        /// <summary>
        /// 作业是否有效
        /// </summary>		
        public bool IsValidity
        {
            get { return _isvalidity; }
            set { _isvalidity = value; }
        }

        private DateTime _addtime = DateTime.Now;
        /// <summary>
        /// 新增时间
        /// </summary>		
        public DateTime AddTime
        {
            get { return _addtime; }
            set { _addtime = value; }
        }

        private string _adder = "";
        /// <summary>
        /// 新增人员
        /// </summary>		
        public string Adder
        {
            get { return _adder; }
            set { _adder = value; }
        }
        private DateTime _modifytime = DateTime.Now;
        /// <summary>
        /// 修改时间
        /// </summary>		
        public DateTime ModifyTime
        {
            get { return _modifytime; }
            set { _modifytime = value; }
        }

        private string _modifer = "";
        /// <summary>
        /// 修改人员
        /// </summary>		
        public string Modifer
        {
            get { return _modifer; }
            set { _modifer = value; }
        }

        private string _resultMsg = "";
        /// <summary>
        /// result
        /// </summary>		
        public string ResultMsg
        {
            get { return _resultMsg; }
            set { _resultMsg = value; }
        }

        /// <summary>
        /// 立即执行
        /// </summary>
        public bool Immediately { get; set; }
    }
}